(function(mui, commonTool) {
	commonTool.log = function(content) {
		console.log(content);
	};

	commonTool.toast = function(content) {
		mui.toast(content);
	};

	commonTool.showWaiting = function(text) {
		plus.nativeUI.showWaiting(text);
	};

	commonTool.closeWaiting = function() {
		plus.nativeUI.closeWaiting();
 	};

	//slideType: string slide-in-bottom(页面从底下弹出) slide-in-right（从右向左）默认是slide-in-right
	commonTool.openWindow = function(url, id, extra,slideType) {
		mui.openWindow({
			url: url,
			id: id,
			show: {
				autoShow: true,
				aniShow: slideType || "slide-in-right"
			},
			waiting: {
				autoShow: true
			},
			extras: extra
		});
	}
	
	commonTool.openWindowNew = function(url, id, extra, slideType){
		mui.openWindow({
			url: url,
			id: id,
			show: {
				autoShow: true,
				aniShow: slideType || "slide-in-right"
			},
			waiting: {
				autoShow: true
			},
			extras: extra,
			createNew:true
		});
	}

}(mui, window.commonTool = {}));